<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>

<script type="text/javascript">
	let data = {
		code : 200,
		data : [{
			name:'李唯一',
			age: 18
		},{
			name:'林刻',
			age:25000
		}]
	}

	console.log(data) //json对象格式

	//将json对象转换为json字符串 JSON.stringify()
	let a = JSON.stringify(data)
	console.log(a)

	//将json字符串转换为json对象 JSON.parse()
	let b = JSON.parse(a)
	console.log(b)
</script>
</body>
</html>